import xlwt

# 创建book,并设定编码
workbook = xlwt.Workbook(encoding='ascii')
#创建新的sheet表
worksheet = workbook.add_sheet('new sheet')
# 向单元格中写入内容
worksheet.write(0,0,'hello')
worksheet.write(2,1,'world')
# 设置列宽
worksheet.col(0).width = 256 * 20
worksheet.col(1).width = 256 * 20
workbook.save('test3.xls')
